package org.totoro.memory;

/**
 * @author daocr
 * @date 2020/3/7
 */
public enum MemoryChunk {
    _512KB() {
        @Override
        public byte[] createChunk() {
            int _512KB = 512 * 1024 * 1;

            return new byte[_512KB];
        }
    },
    _1MB() {
        @Override
        public byte[] createChunk() {
            int _1MB = 1024 * 1024 * 1;
            return new byte[_1MB];
        }
    },
    _2MB() {
        @Override
        public byte[] createChunk() {
            int _2MB = 1024 * 1024 * 2;
            return new byte[_2MB];
        }
    },
    _3MB() {
        @Override
        public byte[] createChunk() {
            int _3MB = 1024 * 1024 * 3;
            return new byte[_3MB];
        }
    },
    _4MB() {
        @Override
        public byte[] createChunk() {
            int _4MB = 1024 * 1024 * 4;
            return new byte[_4MB];
        }
    },
    _5MB() {
        @Override
        public byte[] createChunk() {
            int _5MB = 1024 * 1024 * 5;
            return new byte[_5MB];
        }
    };


    public abstract byte[] createChunk();


}
